package top.lyunz.lucky.hr.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import top.lyunz.lucky.hr.bean.configFileFecondKind;
import top.lyunz.lucky.hr.service.configFileFirstkindService;
import top.lyunz.lucky.hr.tools.SimpleResult;

@Controller
@RequestMapping("/configFileFirstkind")
public class configFileFirstkindController {
	@Autowired
	private configFileFirstkindService configFileFirstkindService;
	
	@RequestMapping("/getConfigFileFirstkind")
	public String getall(Model model) {
		List<configFileFecondKind> arr = configFileFirstkindService.configFileFirstkindgetAll();
		model.addAttribute("arr", arr);
		return "page/recruit/position/position_register";
	}
	@RequestMapping("/configFileFirstkindgetByfirstKindId/{id}")
	@ResponseBody
	public SimpleResult configFileFirstkindgetByfirstKindId(@PathVariable("id") int id) {
		return new SimpleResult(configFileFirstkindService.configFileFirstkindgetByfirstKindId(id));
	}
}
